﻿namespace Gwn.Library.MvpVm.Extensions
{
    /// <summary>
    /// String extension
    /// </summary>
    public static class StringExtension
    {
        /// <summary>
        /// Gets the ASCII value
        /// </summary>
        /// <param name="value">The value.</param>
        /// <returns></returns>
        public static int GetAscii(this string value)
        {
            if (string.IsNullOrEmpty(value))
                return 0;
            
            return (int)value[0];
        }
    }
}
